From 9d58cb641cce48ac4698f9138f7bc44f9b426f02 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 29 Oct 2012 11:09:43 -0700 Subject: [PATCH] [FileRepo] Fixed purging for "short style" thumbnail names. Change-Id: If63b4c609b7bc43cda658cb87abe59562b335c69 --- includes/filerepo/file/LocalFile.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index f42df55c04..f0a3c15e35 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -814,7 +814,9 @@ class LocalFile extends File { foreach ( $files as $file ) { # Check that the base file name is part of the thumb name # This is a basic sanity check to avoid erasing unrelated directories - if ( strpos( $file, $this->getName() ) !== false ) { + if ( strpos( $file, $this->getName() ) !== false + || strpos( $file, "-thumbnail" ) !== false // "short" thumb name + ) { $purgeList[] = "{$dir}/{$file}"; } } -- 2.20.1